package com.nice;

import com.nice.service.InitParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

@Component
@Order(value = 1)
public class SpringBootAfterRunner implements ApplicationRunner {
    @Autowired
    InitParam initParam;
    @Override
    public void run(ApplicationArguments args) throws Exception {
        System.out.println("启动完成后，开始执行方法");
        //一个定时任务，刷新下模拟牌价
        initParam.refushPrice();
    }
}